/* 
 * File:   util_conv.h
 * Author: Ich
 *
 * Created on 12. Januar 2014, 16:53
 *
 * Description:
 * -
 */

#ifndef UTIL_CONV_H
#define	UTIL_CONV_H

#ifdef	__cplusplus
extern "C" {
#endif

#include <GenericTypeDefs.h>
    /*******************************************************************************
     *  public preprocessing definitions
     */

    /*******************************************************************************
     *  public variables
     */

    /*******************************************************************************
     *  public functions
     */

    /* Converts a BCD-Number into a decimal number.
     *
     * param(in)    inBCD     [as BCD] value
     * param(out)   outDec    [as decimal] pointer to value
     *
     * return       success true=ok, else error (f.ex. out of range)
     *
     */
    BOOL utilConv_bcd2dec(UINT8 inBCD, UINT8 *outDec);


    /* Converts a decimal into a BCD-Number number.
     *
     * param(in)    inDec     [as decimal] value
     * param(out)   outBCD    [as BCD] pointer to value
     *
     * return       success true=ok, else error (f.ex. out of range)
     *
     */
    BOOL utilConv_dec2bcd(UINT8 inDec, UINT8 *outBcd);


#ifdef	__cplusplus
}
#endif

#endif	/* UTIL_CONV_H */

